package com.atguigu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author sx
 * @date 2022-02-20 20:57
 */
@Controller
public class IndexController {

    @GetMapping("/test")
    public String test() {
        return "test";
    }
//    @GetMapping("/index")
//    public String index() {
//        return "index";
//    }

    @GetMapping("/msg")
    public String msg(Model model) {
        model.addAttribute("msg","hello~ SpringBoot");
        return "test";
    }
}
